package pojo;

import java.math.BigDecimal;
import java.util.Date;
import java.util.Objects;

public class PayRecord {
    private int payId;
    private int stuId;
    private Date pay_time;
    private BigDecimal payment;
    private boolean remark;

    public PayRecord() {
    }

    public PayRecord(int payId, int stuId, Date pay_time, BigDecimal payment, boolean remark) {
        this.payId = payId;
        this.stuId = stuId;
        this.pay_time = pay_time;
        this.payment = payment;
        this.remark = remark;
    }

    public int getPayId() {
        return payId;
    }

    public void setPayId(int payId) {
        this.payId = payId;
    }

    public int getStuId() {
        return stuId;
    }

    public void setStuId(int stuId) {
        this.stuId = stuId;
    }

    public Date getPay_time() {
        return pay_time;
    }

    public void setPay_time(Date pay_time) {
        this.pay_time = pay_time;
    }

    public BigDecimal getPayment() {
        return payment;
    }

    public void setPayment(BigDecimal payment) {
        this.payment = payment;
    }

    public boolean getRemark() {
        return remark;
    }

    public void setRemark(boolean remark) {
        this.remark = remark;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        PayRecord payRecord = (PayRecord) o;
        return payId == payRecord.payId &&
                stuId == payRecord.stuId &&
                Objects.equals(pay_time, payRecord.pay_time) &&
                Objects.equals(payment, payRecord.payment) &&
                Objects.equals(remark, payRecord.remark);
    }

    @Override
    public int hashCode() {
        return Objects.hash(payId, stuId, pay_time, payment, remark);
    }

    @Override
    public String toString() {
        return "PayRecord{" +
                "payId=" + payId +
                ", stuId=" + stuId +
                ", pay_time=" + pay_time +
                ", payment=" + payment +
                ", remark='" + remark + '\'' +
                '}';
    }
}
